package cn.cwkizq.springmvctest.rocketmq;

import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.gome.rocketmq.client.extension.MessageConsumer;

@Component
public class MessageConsumerTest implements MessageConsumer<String> {
	private Log logger = LogFactory.getLog(this.getClass());

	@Override
	public void consume(String message) throws Exception {
		String orderId = message;
		try {
			Long currentTime = System.currentTimeMillis();
			this.logger.info("orderId=" + orderId + "自动审核成功！");
			System.out.println(System.currentTimeMillis() - currentTime);
		} catch (Exception e) {
			this.logger.error("orderId=" + orderId + "自动审核报错：", e);
		}
	}
}
